<?php
//Create by Nguyen 23/08/2012
include_once 'YahooOauth.php';

$cuncumer_key='dj0yJmk9cW1oSmJ3QVBKU0lKJmQ9WVdrOU1GVkxSVFZ6TldjbWNHbzlORE15TVRFNE1qWXkmcz1jb25zdW1lcnNlY3JldCZ4PWYw';
$cunsumer_secret='cc85b2a791174fce2d39d1a176b61da29c7a95c1';

$argarray = $argv[0];
$debug = 0; // Set to 1 for verbose debugging output
$callback='http://99xu.vn/catalog/controller/account/plugin/Yahoo/GetContact.php';

$oauth =new YahooOauth($cuncumer_key, $cunsumer_secret, $argarray, $debug, $callback);

//echo $oauth->oauth_cunsumer_secret;

$getcontact=new YahooGetContacts();
$accrss_token=$getcontact->get_request_token($oauth, false, true, true);
//var_dump($accrss_token);


//get access to Gmail

session_start();

$_SESSION['oauth_token']=$accrss_token['oauth_token'];
$_SESSION['oauth_token_secret']=$accrss_token['oauth_token_secret'];

header('Location: https://api.login.yahoo.com/oauth/v2/request_auth?oauth_token=' . $oauth->rfc3986_decode($accrss_token['oauth_token']));
?>



